var kmsModel = require("../common/kmsModelClient.js");
var redirectionSys = {
    titles: {
        main: "中科智视",
        sub: "医教视频管理系统"
    },
    model: new kmsModel.TKmsModelClient(),
    checkLogin(code, pwd) {
        var me = this;
        var res = {
            status: 0,
            info: {}
        };
        return new Promise((success, faild) => {
            try {
                var key = "redirection/checkLogin";
                var ps = {
                    code,
                    pwd
                };
                me.model.query(key, ps).then(_res => {
                    res.status = _res && _res.length > 0;
                    res.info = res.status ? _res[0] : {};
                    success(res);
                });
            } catch (error) {
                console.log(error);
                success(res);
            }
        });
    }
};
redirectionSys.model.config.dbKey = "redirection";
export {
    redirectionSys
};